﻿//********************************************************************************//
//创建日期：<创建日期，2016-04-24>
//创建作者：<郭登杰，guodengjie@shanghai3h.com>
//功能说明：采灌井征询单
//********************************************************************************//
using System;
using System.Collections.Generic;
using YXYLCommon;
using System.Data;

namespace Entity
{
    [Serializable]
    /// <summary>
    /// 采灌井征询单
    /// </summary>
    public class QSQTCaiGuanJZXD : BaseModel
    {
        public QSQTCaiGuanJZXD()
        {
          
        }

        public string S_YONGHUH { get; set; }

        public string S_YONGHUM { get; set; }

        public int I_YM { get; set; }

        public string S_DIZHI { get; set; }

        public string S_YOUBIAN { get; set; }

        public string S_PRINTDATE { get; set; }

        public string S_RETURNDATE { get; set; }

        public override BaseModel ToObject(System.Data.DataRow row)
        {
            this.IsExists = true;
            this.S_YONGHUH = Convert.ToString(row["S_YONGHUH"]);
            this.S_YONGHUM = Convert.ToString(row["S_YONGHUM"]);
            this.S_DIZHI = Convert.ToString(row["S_DIZHI"]);
            this.S_YOUBIAN = Convert.ToString(row["S_YOUBIAN"]);
            this.I_YM = row.Table.Columns.Contains("I_YM")?Convert.ToInt32(row["I_YM"]):-1;
            this.S_PRINTDATE = Convert.ToString(row["S_PRINTDATE"]);
            this.S_RETURNDATE = Convert.ToString(row["S_RETURNDATE"]);
            return this;
        }
    }
    public class DALQSQTCaiGuanJZXD : BaseDAL
    {
        public DALQSQTCaiGuanJZXD()
        {

        }
        protected override void fillSaveProc(BaseModel model)
        {
            
        }

        public List<QSQTCaiGuanJZXD> Get(int ym,string printdate,string returndate,string yhhs)
        {
            dbProc.Init("P_QSPJ_CAIGUANJZXD");
            dbProc.AddParameter("V_Y", ym);
            dbProc.AddParameter("V_PRINTDATE", printdate);
            dbProc.AddParameter("V_RETURNDATE", returndate);
            dbProc.AddParameter("V_YONGHUHS", yhhs);
            return CommonService.Ini().GetList<QSQTCaiGuanJZXD>(dbProc);
        }
    }

}